package com.ticket.sass.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ticket.sass.admin.mapper.CommodityCloudPrinterHallMapMapper;
import com.ticket.sass.admin.service.BaseService;
import com.ticket.sass.common.entity.tenant.CommodityCloudPrinterHallMapEntity;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ywb
 * @since 2024-04-08
 */
@Service
public class CommodityCloudPrinterHallMapServiceImpl extends ServiceImpl<CommodityCloudPrinterHallMapMapper, CommodityCloudPrinterHallMapEntity> implements BaseService<CommodityCloudPrinterHallMapEntity> {
    @Override
    public CommodityCloudPrinterHallMapEntity createNewInstance() {
        return new CommodityCloudPrinterHallMapEntity();
    }
    
    @Override
    public void setFieldValue(CommodityCloudPrinterHallMapEntity entity, String fieldName, Object value) {
        switch (fieldName) {
            case "hall_id" -> {
                entity.setHallId((Long) value);
                break;
            }
            case "printer_id" -> {
                entity.setPrinterId((Long) value);
                break;
            }
            default -> {
                break;
                // 其他字段同理
            }
        }
    }
}
